package cn.ex.org.domain;

import cn.ex.basic.domain.BasicDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: ZeWangmu
 * @Date: 2022/06/01/13:06
 * @Description:
 * 实体类
 */
@Data
@AllArgsConstructor   //生成所有参数的构造方法
@NoArgsConstructor    //生成无参构造
public class Department extends BasicDomain {
   private String sn;
   private String name;
   @ApiModelProperty("部门的上级分类层级id")
   private String dirPath;
   //准备一个层级集合
   @JsonInclude(JsonInclude.Include.NON_EMPTY)  //如果集合为空，则不返回给前端
   private List<Department> children = new ArrayList<>();
   private Integer state;
   private Long manager_id;
   //多方(引用属性)部门负责人
   private Employee manager;
   private Long parent_id;
   //上级部门(引用属性)
   private Department parent;
   private Long shop_id;


}
